Skip to content

bpo-36381: warn when no PY_SSIZE_T_CLEAN#12473

Merged
methane merged 3 commits into
python:masterfrom
methane:warn-no-ssize_t_clean
Mar 23, 2019
Merged

bpo-36381: warn when no PY_SSIZE_T_CLEAN#12473
methane merged 3 commits into
python:masterfrom
methane:warn-no-ssize_t_clean

Conversation

@methane

@methane methane commented Mar 20, 2019

Copy link
Copy Markdown
Member

We will remove int support from 3.10 or 4.0.

https://bugs.python.org/issue8677

We will remove int support from 3.10 or 4.0.
@methane methane requested a review from vstinner March 20, 2019 12:54
@methane methane changed the title bpo-8677: warn when no PY_SSIZE_T_CLEAN bpo-36381: warn when no PY_SSIZE_T_CLEAN Mar 20, 2019

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. IMHO it's time to deprecate that. Using int in 2019 can lead to bugs, most CPUs are 64-bit.

Comment thread Doc/whatsnew/3.8.rst Outdated
Changes in the C API
--------------------

* Use of ``#`` variants of formats without ``PY_SSIZE_T_CLEAN`` defined

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, it's non obvious that these formats are used to parse function arguments. Maybe mention "ex: PyArg_ParseTuple"?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add references to PyArg_ParseTuple and Py_BuildValue.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, I always forget about Py_BuildValue() which is the "opposite" or PyArg_ParseTuple().

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the What's New entry should be more detailed.

Comment thread Doc/whatsnew/3.8.rst Outdated
Changes in the C API
--------------------

* Use of ``#`` variants of formats without ``PY_SSIZE_T_CLEAN`` defined

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add references to PyArg_ParseTuple and Py_BuildValue.

And replace PendingDeprecationWarning with DeprecationWarning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants